package com.itheima.sys.client;

import com.itheima.common.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "sys-service", contextId = "sys")
public interface SysClient {

    /**
     * 查询企业部门ID
     *
     * @return
     */
    @GetMapping("/organization/department/top")
    public Result<List<Long>> queryDepartmentIds();


    /**
     * 根据员工id获得部门从低到高数组
     * @param companyUserId
     * @return
     */
    @GetMapping("/department/allId/{companyUserId}")
    Result<Long[]> queryDepartmentsByUserId(@PathVariable("companyUserId") Long companyUserId);

}
